package com.pactera.madp.cp.api.dto.contactfieldpivot;

import com.pactera.madp.common.core.exception.CheckedException;
import com.pactera.madp.cp.api.ex.ParamException;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * @author zhaojinjian
 * @createTime 2020/12/24 18:11
 */
@Data
@ApiModel(value = "客户详情-修改")
public class ContactFieldPivotDto {

    @ApiModelProperty(value = "客户id")
    @NotNull(message = "客户id不能为空")
    private Integer contactId;

    @ApiModelProperty(value = "客户属性 举例：\"userPortrait\": \"[{'contactFieldId':1,'contactFieldPivotId':2,'type':3,'value':'qawdsqw'}]\" ")
    @NotNull(message = "客户属性不能为空")
    private String userPortrait;

    private Integer employeeId;

    @Data
    @ApiModel(value = "客户属性数据")
    public static class UserPortrait
    {
        @ApiModelProperty(value = "客户标签id")
        private Integer contactFieldId;
        @ApiModelProperty(value = "客户属性id")
        private Integer contactFieldPivotId;
        @ApiModelProperty(value = "客户属性类型")
        private Integer type;
        @ApiModelProperty(value = "高级属性值")
        private String value;
        @ApiModelProperty(value = "状态值，未修改为0 已修改为1")
        private Integer status;
    }
}
